<template>
  <div class="dashboard-container">
    <div class="dashboard-text">账户: {{ name }}</div>
    <div class="dashboard-text">角色:
      <span v-if="roles == 'admin'">管理员</span>
      <span v-else-if="roles == 'salesman'">管理员</span>
      <span v-else>普通账户</span>
    </div>
    <div class="dashboard-text">可添加程序数量: {{ end_num }}</div>
    <div class="dashboard-text">账户到期时间: {{ end_time }}</div>

  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name',
      'roles',
      'end_time',
      'end_num'
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
